﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Brain
{
    public class VisualScript : IUpdateable, IBaseComponent
    {
        public List<VisualScriptNode_Actor> Actors;

        public List<VisualScriptNode> AllNodes;

        public bool ShouldUpdate { get; set; }

        public string Name { get; set; }

        public VisualScript()
        {
            ShouldUpdate = true;
            Actors = new List<VisualScriptNode_Actor>();
            AllNodes = new List<VisualScriptNode>();
        }

        public void Update()
        {
            for (int i = 0; i < Actors.Count; i++)
            {
                VisualScriptNode_Actor actor = Actors[i];
                actor.Update();
            }
        }

        public bool ShouldSerialize { get; set; }

        public void SerializeData(SerializationData parentData, int index)
        {
        }

        public void DeserializeData(SerializationData parentData, int index)
        {
        }
    }
}
